+# Build for Big Endian?
+BIGENDIAN := n
+
ARCH_CFLAGS := -mfixed-range=f2-f5,f12-f15,f32-f127 -mconstant-gp
ARCH_CFLAGS += -O2
ARCH_ASFLAGS := -x assembler-with-cpp
ARCH_ASFLAGS += -fno-builtin -fno-common -fno-strict-aliasing -mconstant-gp
ARCH_LDFLAGS = -warn-common
+
+# Next lines are for big endian code !
+ifeq ($(BIGENDIAN),y)
+ARCH_CFLAGS += -mbig-endian -Wa,-mbe -Wa,-mlp64
+ARCH_CFLAGS += -DBIG_ENDIAN
+ARCH_ASFLAGS += -Wa,-mbe
+ARCH_ASFLAGS += -DBIG_ENDIAN
+ARCH_LDFLAGS = -EB -d
+endif
+
major = minor >> 16;
minor &= ~0xffffffff;
printk("Running on Xen version: %d.%d\n", major, minor);
+#if 0
printk("machine addr of shared_info_t : 0x%lx\n",
start_info.shared_info);
printk("machine page number of shared page: 0x%lx\n",
start_info.console.domU.mfn);
printk("evtchn for console messages : %d\n",
start_info.console.domU.evtchn);
- printk("xen_guest_cmdline : %s\n", boot_cmd_line);
+#endif
+ if(strlen(boot_cmd_line) > 0)
+ printk("xen_guest_cmdline : %s\n", boot_cmd_line);
}
+
#include "ia64_cpu.h"
#include "ia64_fpu.h"
#include "offsets.h"
+#include "xen/xen.h"
/*
br.ret.sptk.many b0
;;
END(__hypercall)
+
+/*
+ * Stub for suspend.
+ * Just force the stacked registers to be written in memory.
+ */
+ENTRY(xencomm_arch_hypercall_suspend)
+ ;;
+ alloc r20=ar.pfs,0,0,6,0
+ mov r2=__HYPERVISOR_sched_op
+ ;;
+ /* We don't want to deal with RSE. */
+ flushrs
+ mov r33=r32
+ mov r32=2 // SCHEDOP_shutdown
+ ;;
+ break 0x1000
+ ;;
+ br.ret.sptk.many b0
+END(xencomm_arch_hypercall_suspend)
+
map_frames(unsigned long* frames, unsigned long n)
{
n = n;
- return (void*) __va(frames[0] << PAGE_SHIFT);
+ return (void*) __va(SWAP(frames[0]) << PAGE_SHIFT);
}
void arch_init_p2m(unsigned long max_pfn)
return -EINVAL;
rc = xencomm_create_mini
(xc_area, nbr_area,
- xen_guest_handle(setup->frame_list),
- setup->nr_frames
+ (void*)SWAP((uint64_t)
+ xen_guest_handle(setup->frame_list)),
+ SWAP(setup->nr_frames)
* sizeof(*xen_guest_handle(setup->frame_list)),
&desc1);
if (rc)
return rc;
- set_xen_guest_handle(setup->frame_list, (void *)desc1);
+ set_xen_guest_handle(setup->frame_list,
+ (void *)SWAP((uint64_t)desc1));
break;
}
case GNTTABOP_dump_table:
return xencomm_mini_hypercall_grant_table_op(cmd, uop, count);
}
+ /* In fw.S */
+extern int xencomm_arch_hypercall_suspend(struct xencomm_handle *arg);
+int
+HYPERVISOR_suspend(unsigned long srec)
+{
+ struct sched_shutdown arg;
+
+ arg.reason = (uint32_t)SWAP((uint32_t)SHUTDOWN_suspend);
+
+ return xencomm_arch_hypercall_suspend(xencomm_create_inline(&arg));
+}
+
if (unlikely(rc == -ENOSYS)) {
struct evtchn_op op;
- op.cmd = cmd;
+ op.cmd = SWAP(cmd);
memcpy(&op.u, arg, sizeof(op.u));
rc = _hypercall1(int, event_channel_op_compat, &op);
}